function out = asian_call_ctrl(S0, mu, sigma, K, T, N, M)
price_mat = zeros(N + 1, M * 2);

for i = 1 : M
    price_mat(:, 2 * i - 1 : 2 * i) = underlyingpath_dw(S0, mu, sigma, T, N);
end


out.asian_mc = mean(max(mean(price_mat, 1) - K, 0)) * exp(-mu * T);
out.eur_mc = mean(max(price_mat(end, :) - K, 0)) * exp(-mu * T);
out.eur_bs = blsprice(S0, K, mu, T, sigma);
out.asian_ctrl = (out.asian_mc - out.eur_mc) + out.eur_bs;

end